package com.hk.commons.enm;

public enum OrderCodeEnum {
	ConstantOrderType_22("22", 22),// "申购",
	
	ConstantOrderType_20("20", 20),// "认购", 
	
	ConstantOrderType_24("24",  24),// "赎回",
	
	ConstantOrderType_36("36", 36),// "转换", 
	
	ConstantOrderType_39("39",   39),//"定投申购",
	
	ConstantOrderType_29("29",   29),//"修改分红方式",
	
	ConstantOrderType_134("134",   134),//"非交易过户转入确认",
	
	ConstantOrderType_135("135",  135),// "非交易过户转出确认",
	
	ConstantOrderType_142("142",  142),//"强制赎回", 
	
	ConstantOrderType_144("144", 144),// "强行调增", 
	
	ConstantOrderType_145("145",  145),//"强行调减", 
	
	ConstantOrderType_W01("W01",  1),//"盈米宝充值", 
	
	ConstantOrderType_W02("W02",  2),// "盈米宝快速提现",
	
	ConstantOrderType_W03("W03", 3),// "盈米宝普通赎回", 
	
	ConstantOrderType_W04("W04",  4),//"盈米宝购买", 
	
	ConstantOrderType_W05("W05",  5),//"赎回到盈米宝", 
	
	ConstantOrderType_W06("W06",  6),//"转换到盈米宝", 
	
	ConstantOrderType_W07("W07", 7),// "盈米宝支付", 
	
	ConstantOrderType_W08("W08",   8),//"盈米宝退款",
	
	ConstantOrderType_W09("W09",  9),//"分红自动充值", 
	
	ConstantOrderType_W10("W10",   10),//"退款自动充值",
	
	ConstantOrderType_W11("W11",  11),//"盈米宝支付的定投申购 (待定中)", 
	
	ConstantOrderType_P01("P01",  101),//"购买组合", 
	
	ConstantOrderType_P02("P02",  102),//"盈米宝购买组合", 
	
	ConstantOrderType_P03("P03",  103),//"赎回组合", 
	
	ConstantOrderType_P04("P04",   104);//"组合调仓",
	
	private String code;

	//private String msg;
	
	private Integer orderType;
	
	private OrderCodeEnum(String code,Integer orderType) {
		this.code = code;		
		this.setOrderType(orderType);
	}

	public static Integer getOrderTypeByCode(String code){
		for (OrderCodeEnum c : OrderCodeEnum.values()) {
            if (c.getCode().equals(code)) {
                return c.orderType;
            }
        }
		return null;
	}
	public String getCode() {
		return code;
	}

//	public String getMsg() {
//		return msg;
//	}

	public Integer getOrderType() {
		return orderType;
	}

	public void setOrderType(Integer orderType) {
		this.orderType = orderType;
	}
}
